{% extends 'news/base.html' %}

{% block Blocktitle %}
用户概况
{% endblock %}

{% block Blockscript %}
    <link rel="stylesheet" type="text/css" href="../../static/news/css/jquery.pagination.css">
    <script type="text/javascript" src="../../static/news/js/other.js"></script>
{% endblock %}

{% block Blockshow %}
    <div class="user_menu_con fl">
        <div class="user_center_pic">
            <img src="
                {% if data.author.avatar_url %}
                    {{ data.author.avatar_url }}
                {% else %}
                    ../../static/news/images/user_pic.png
                {% endif %}
                " alt="用户图片">
        </div>
            <div class="user_center_name">{{ data.author.nick_name }}</div>

            <ul class="other_detail">
                <li>性 别：{{ data.author.gender }}</li>
                <li>签 名：
                    {% if data.author.signature %}
                        {{ data.author.signature }}
                    {% else %}
                        这个人很懒，什么都没留下
                    {% endif %}
                </li>
            </ul>

            <div class="focus_other">
                <a href="javascript:;" class="focus" style="display:{% if not data.is_followed %}
                block{% else %}none{% endif %}" data-userid="{{ data.author.id }}">关注</a>
        <a href="javascript:;" class="focused" style="display:{% if data.is_followed %}
                block{% else %}none{% endif %}" data-userid="{{ data.author.id }}"><span class="out">已关注</span><span class="over">取消关注</span></a>
            </div>

    </div>

    <div class="user_con fr">
        <div class="other_collect">
            <h3>他的文章</h3>
            <ul class="article_list">
                {% for news in data.news_list %}
                    <li><a href="/news/{{ news.id }}">{{ news.title }}</a><span>{{ news.create_time }}</span></li>
                {% endfor %}
            </ul>

            <div id="pagination" class="page"></div>
            <script>
                $(function(){
                    $("#pagination").pagination({
                        currentPage: 2,
                        totalPage: 3,
                        callback: function(current) {
                            alert('ok')
                        }
                    });
                });
            </script>
        </div>

    </div>
{% endblock %}